#ifndef _BSP_KEY_H_
#define _BSP_KEY_H_

#include "ti_msp_dl_config.h"
//#include "main.h"

struct Key
{
    uint8_t key_index;
    uint8_t key_level;
    uint8_t key_short;
    uint8_t key_long;
    uint8_t key_time;
};

//外界接口
extern struct Key key[4];
//DL_GPIO_readPins(KEY_PORT, KEY_PIN_21_PIN) == 0 
#define KEY0_LEVEL DL_GPIO_readPins(KEY_PORT     , KEY_PIN_0_PIN  )
#define KEY1_LEVEL DL_GPIO_readPins(KEY_PORT     , KEY_PIN_1_PIN  )
#define KEY2_LEVEL DL_GPIO_readPins(KEY_PORT     , KEY_PIN_2_PIN  )
#define KEY3_LEVEL DL_GPIO_readPins(KEY_PORT     , KEY_PIN_3_PIN  )

void BSP_Key_Handle(void);

#endif